import type { CancelForm, CreateForm } from '#/reserve-home'
import request from '@/utils/request'

// 获取场馆基础信息
export function getVenueList() {
  return request({
    url: '/venue/info',
    method: 'get'
  })
}

export function getVenueReservationByDate(queryDate: string) {
  return request({
    url: '/venueDue/list',
    method: 'get',
    params: {
      queryDate
    }
  })
}

export function addVenueReservation(data: CreateForm) {
  return request({
    url: '/venueDue/add',
    method: 'post',
    data
  })
}

export function cancelVenueReservation(data: CancelForm) {
  return request({
    url: '/venueDue/remove',
    method: 'post',
    data
  })
}
